<?php
/**
* @version		$Id: default.php 9 2011-11-01 13:45:27Z netix.mail@gmail.com $
* @package		ALM Hotel Menager	
* @subpackage	com_almhm
* @author		ALM Studio
* @copyright	Copyright 2011 ALM Studio. All rights reserved
* @licence		Commercial
*/

defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tooltip');
JHTML::_('script','system/multiselect.js',false,true);
$listOrder	= $this->escape($this->state->get('list.ordering'));
$listDirn	= $this->escape($this->state->get('list.direction'));
?>
<form action="<?php echo JRoute::_('index.php?option=com_almhm&view=kategorijas'); ?>" method="post" name="adminForm">
	<fieldset id="filter-bar">	
		<div class="filter-search fltlft">
			<label class="filter-search-lbl" for="filter_search"><?php echo JText::_('COM_ALMHM_FILTER_NASLOV'); ?></label>
			<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" title="<?php echo JText::_('COM_ALMHM_FILTER_TEXT'); ?>" />
			<button type="submit"><?php echo JText::_('COM_ALMHM_FILTER_TIPKA'); ?></button>
			<button type="button" onclick="document.id('filter_search').value='';this.form.submit();"><?php echo JText::_('COM_ALMHM_FILTER_RESET'); ?></button>
		</div>
	</fieldset>
<div class="clr"></div>
<table class="adminlist">
	<thead>
		<tr>
			<th width="5">
				<?php echo JHtml::_('grid.sort',  'COM_ALMHM_LIST_ID', 'KategorijaId', $listDirn, $listOrder); ?>
			</th>
			<th width="10">
				<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($this->items); ?>);" />
			</th>
			<th>
				<?php echo JHtml::_('grid.sort',  'COM_ALMHM_KATEGORIJA_NAZIV_NASLOV', 'KategorijaNaziv', $listDirn, $listOrder); ?>
			</th>			
		</tr>
	</thead>
	<tfoot>	
		<tr>
			<td colspan="3">
				<?php echo $this->pagination->getListFooter(); ?></td>
		</tr>		
	</tfoot>
	<tbody>
		<?php foreach($this->items as $i => $item): 
?>
		<tr class="row<?php echo $i % 2; ?>">
			<td>
				<?php echo $item->KategorijaId; ?>
			</td>
			<td>
				<?php echo JHtml::_('grid.id', $i, $item->KategorijaId); ?>
			</td>
			<td>
			<a href="<?php echo JRoute::_('index.php?option=com_almhm&task=kategorija.edit&KategorijaId=' . $item->KategorijaId); ?>">
				<strong><?php echo $item->KategorijaNaziv; ?></strong>
				</a>
			</td>
		</tr>
		<?php endforeach; ?>
	</tbody>
</table>
	<div>
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
		<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
